<template>
  <div class="parent">
    <Headers :title="title" />
    <div class="content">
      <ul class="list">
        <li class="listItem">
          <div @click="goDetail('待分配')">
            <div class="top">
              <div class="iconText">
                <span class="icon iconDistribution iconfont icon-x"></span>
                <span class="text">待分配</span>
              </div>
              <span class="time">52秒前</span>
            </div>
            <div class="middle">
              <div class="title">
                <span class="name">SLNA-009U低环境温度空气源热泵(冷水)机组</span>
              </div>
              <div class="serialNumber">
                <span class="name">序列号 1525485254862</span>
              </div>
            </div>
          </div>
          <div class="btm">
            <div class="btnOne" @click="btnMsg">
              <span class="text">取消</span>
            </div>
          </div>
        </li>
        <li class="listItem">
          <div @click="goDetail('维修完成')">
            <div class="top">
              <div class="iconText">
                <span class="icon iconComplete iconfont icon-Groupx"></span>
                <span class="text">维修完成</span>
              </div>
              <span class="time">20分钟前</span>
            </div>
            <div class="middle">
              <div class="title">
                <span class="name">SLNA-009U低环境温度空气源热泵(冷水)机组</span>
              </div>
              <div class="serialNumber">
                <span class="name">序列号 1525485254862</span>
              </div>
            </div>
          </div>
          <div class="btm">
            <div class="btnOne" @click="btnMsg">
              <span class="text">评价</span>
            </div>
          </div>
        </li>
        <li class="listItem">
          <div @click="goDetail('待维修')">
            <div class="top">
              <div class="iconText">
                <span class="icon iconRepair iconfont icon-icon-test2"></span>
                <span class="text">待维修</span>
              </div>
              <span class="time">2019-1-10 18:26</span>
            </div>
            <div class="middle">
              <div class="title">
                <span class="name">SLNA-009U低环境温度空气源热泵(冷水)机组</span>
              </div>
              <div class="serialNumber">
                <span class="name">序列号 1525485254862</span>
              </div>
            </div>
          </div>
          <div class="btm">
            <div class="btnOne" @click="btnMsg">
              <span class="text">取消</span>
            </div>
          </div>
        </li>
        <li class="listItem">
          <div @click="goDetail('已关闭')">
            <div class="top">
              <div class="iconText">
                <span class="icon iconClose iconfont icon-GroupCopy"></span>
                <span class="text">已关闭</span>
              </div>
              <span class="time">2018-12-10 15:32</span>
            </div>
            <div class="middle">
              <div class="title">
                <span class="name">SLNA-009U低环境温度空气源热泵(冷水)机组</span>
              </div>
              <div class="serialNumber">
                <span class="name">序列号 1525485254862</span>
              </div>
            </div>
          </div>
          
          <!-- <div class="btm">
            <div class="btnOne">
              <span class="text">取消</span>
            </div>
          </div> -->
        </li>
      </ul>
    </div>
  </div>
</template>
<script>
import Headers from '@/components/header-return'
import { Toast } from 'mint-ui'
export default {
  name: 'MyBusiness',
  data () {
    return {
      title: '我的业务'
    }
  },
  components: {
    Headers
  },
  methods: {
    goDetail (item) {
      if (item === '待分配') {
        this.$router.push({
          path: '/myBusinessDetail'
        })
      } else {
        Toast({
          message: '当前版本不可执行此操作，请联系4006-506-803开通正式版本',
          position: 'middle',
          duration: 2000
        })
      }
    },
    btnMsg () {
      Toast({
        message: '当前版本不可执行此操作，请联系4006-506-803开通正式版本',
        position: 'middle',
        duration: 2000
      })
    }
  }
}
</script>
<style scoped lang="scss">
.parent{
  width: 100%;
  height: 100%;
  background: #f9f9f9;
}
.listItem{
  width: 100%;
  height: 142px;
  background: #fff;
  margin-bottom: 6px;
  .top{
    width: 100%;
    height: 40px;
    border-bottom: 1px solid #f4f4f4;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 14px;
    background:rgba(59,139,251,0.1);
    .text{
      font-size:14px;
      font-family:PingFangSC-Regular;
      font-weight:400;
      color:rgba(0,0,0,1);
    }
    .time{
      font-size:12px;
      font-family:PingFangSC-Regular;
      font-weight:400;
      color:rgba(153,153,153,1);
    }
    .icon{
      font-size: 16px;
    }
    .iconDistribution{
      color: #F08022;
    }
    .iconRepair{
      color: #3496F8;
    }
    .iconComplete{
      color: #8DC240;
    }
    .iconClose{
      color: #F15D5A;
    }
  }
  .middle{
    width: 100%;
    height: 60px;
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    border-bottom: 1px solid #f4f4f4;
    .title{
      height: 27.5px;
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      align-items: center;
    }
    .serialNumber{
      height: 27.5px;
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      align-items: center;
    }
    .name{
      font-size: 16px;
      font-family:PingFangSC-Regular;
      font-weight:400;
      color:rgba(0,0,0,1);
    }
  }
  .btm{
    width: 100%;
    height: 42px;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    .btnOne{
      width:80px;
      height:30px;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      margin-right: 12px;
      background:#3B8BFB;
      border-radius: 2px;
      .text{
        font-size:16px;
        font-family:PingFangSC-Regular;
        font-weight:400;
        color:rgba(255,255,255,1);
      }
    }
  }
}
</style>
